package leetcode_interview;

public class I0109 {

    public boolean isFlipedString(String s1, String s2) {
        if (s1.length() != s2.length())
            return false;
        if (s1.equals("")&&s2.equals(""))
            return true;
        int length = s1.length();
        for (int i = 0; i < length; i++) {
            String frontSubString = s1.substring(0, i);
            String backSubString = s1.substring(i);
            if ((backSubString + frontSubString).equals(s2))
                return true;
        }
        return false;
    }
}
